package com.leyou.user;

import com.leyou.user.domain.AddressDTO;
import com.leyou.user.domain.UserDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("user-service")
public interface UserClient {

    @GetMapping("/query")
    public UserDTO queryUser(@RequestParam String username,@RequestParam String password);

    @GetMapping("/address")
    public AddressDTO queryAddressById(@RequestParam("userId") Long userId, @RequestParam("id") Long id);
}
